import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

// 固定的路由表
export const fixedRouter = [{
        path: '/login',
        component: () =>
            import ('@/views/login/index.vue')
    },
    {
        path: '/',
        component: () =>
            import ('@/views/layOut.vue'),
        children: [{
            path: '/home',
            component: () =>
                import ('@/views/home.vue'),
            meta: {
                title: '首页',
                icon: 'el-icon-info'
            }
        }],
        redirect: '/home' //二级路由默认显示
    },
    {
        component: () =>
            import ('@/views/404.vue'),
        path: '*',
    }
]

// 需要权限判断展示的路由
export const permissionRouter = []

export default new Router({
    routes: fixedRouter,
    // mode: "history"
})